/** 该文件仅存放活动模块相关的接口API */
import myaxios from "../MyAxios";
// 引入路径前缀
import BASEURL from '../BaseUrl'
const { BMDURL } = BASEURL

const activityApi = {

  /**
     * 通过类型id查询对应活动
     * @param {Object}} params  {activity_type_id}
     */
  activityByTypeId(params) {
    return myaxios.get(BMDURL + "/v1/activity/activity_info", params)
  },

  /**
     * 查询所有活动类型
     * @param {Object}} params  {}
     */
  activityTypeList(params) {
    return myaxios.get(BMDURL + "/v1/activity/activity_type_all", params)
  },


  /**
   * 查询活动轮播图
   * @param {Object}} params  {}
   */
  activitySwiper(params) {
    return myaxios.get(BMDURL + "/v1/activity/pic", params)
  },

  /**
    * 查询活动列表
    * @param {Object}} params  {}
    */
  activityList(params) {
    return myaxios.get(BMDURL + "/v1/activity/list", params)
  },

  /**
   * 新增活动
   * @param {Object}} params  {pic,title,time,number}
   */
  activityAdd(params) {
    return myaxios.post(BMDURL + "/v1/activity/list", params)
  },



}

export default activityApi;